package com.erlinyou.im.web.controller.base;
public enum Source {
	WEB(1), APP(2),UNKNOW(0);// 客服
	private Integer code;

	Source(Integer code) {
		this.code = code;
	}

	public static Source valueOfStr(String num) {
		switch (num) {
		case "1":
			return WEB;
		case "2":
			return APP;
		default:
			return UNKNOW;
		}
	}
	
	public static Source valueOf(int num) {
		switch (num) {
		case 1:
			return WEB;
		case 2:
			return APP;
		default:
			return UNKNOW;
		}
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

}